{yun:}include file="$wapstyle/member/header.htm"{/yun}
<script>
    var eid = '{yun:}$info.id{/yun}';

    $(document).ready(function() {
        $("input[name='days']").click(function() {
            var val = $(this).val();
            countmoney(val);
        });
    });

    function countmoney(val) {
        var price = $("#price").val();
        var money = parseInt(val * (price * 100)) / 100;
        $(".pricehtml").html(money);
    }
</script>

<section class="wap_member">
    
    <div class="wap_member_comp_h1"><span>简历置顶</span></div>

    {yun:}if $smarty.get.server=='1'{/yun}
    <form action="index.php?c=getOrder" method="post" onsubmit="return pay_form('zdresume');">
        <div class="set_top_name"><span class="set_top_name_n">简历名称：</span>{yun:}$info.name{/yun}</div>
        <div class="set_top_name set_top_bor">
        	<span class="set_top_name_n">结束时间：</span>{yun:}if $info.topdatetime gt 0{/yun}{yun:}$info.topdate{/yun}{yun:}else{/yun}
            <font color="#999">暂未推广</font>{yun:}/if{/yun}
      	</div>

        <div class="set_top_day_box mt15">
        	<span class="set_top_day_box_n">置顶时长：</span>
            <div class="clear"></div>
            <ul class="set_top_day">
                <li><span class="set_top_day_n"><label class=""><input type="radio" checked name="days" value='1'>1天</label></span></li>
                <li><span class="set_top_day_n"><label class=""><input type="radio" name="days" value='3'>3天</label></span></li>
                <li><span class="set_top_day_n"><label class=""><input type="radio" name="days" value='7'>7天</label></span></li>
                <li><span class="set_top_day_n"><label class=""><input type="radio" name="days" value='15'>15天</label></span></li>
                <li><span class="set_top_day_n"><label class=""><input type="radio" name="days" value='30'>30天</label> </span></li>
            </ul>
            <div class="clear"></div>
        </div>
        <div class="set_top_money">
            所需金额：<span class="getserbver_box_s pricehtml">{yun:}$config.integral_resume_top{/yun}</span> 元
        </div>

        <div class="mt10">
            {yun:}if $paytype.wxpay{/yun}
            <div class="spread_box spread_box_bor">
                <div class="spread_zf_list" onclick="paycheck('wxpay');">
                    <i class="wxpay member_set_meal_fk_xz" style="top:0"></i> 微信支付
                </div>
            </div>
            {yun:}/if{/yun} {yun:}if $paytype.alipay{/yun}
            <div class="spread_box spread_box_bor" onclick="paycheck('alipay');">
                <div class="spread_zf_list spread_zf_list_zfb">
                    <i class="alipay member_set_meal_fk_xz" style="top:0"></i> 支付宝支付
                </div>
            </div>
            {yun:}/if{/yun} {yun:}if $paytype.wxpay||$paytype.alipay{/yun}
            <div class=" mt15">
                <div class=""><input type="button" value="确认支付" name=nextstep class="reinputText2" onclick="serverPay('zdresume','{yun:}$info.id{/yun}');"></div>
            </div>
            {yun:}else{/yun} 
            <div class="pay_zfgb_tip">
                    <span>网站已关闭支付功能，请联系管理员！</span>
               
            </div>
            {yun:}/if{/yun} {yun:}if $config.sy_freewebtel{/yun}
            <div class="getserbver_box_tel mt15">
                <a href="tel:{yun:}$config.sy_freewebtel{/yun}">客服电话：{yun:}$config.sy_freewebtel{/yun}</a>
            </div>{yun:}/if{/yun}
            <input id="paytype" name="paytype" type="hidden" value="" />
            <input id="price" type="hidden" value="{yun:}$config.integral_resume_top{/yun}" />
            <input name="xsdays" id="xsdays" type="hidden" value="" />
		</div>
    </form>
   
    {yun:}elseif $smarty.get.server=='2'{/yun}

    <form action="index.php?c=getOrder" method="post" onsubmit="return pay_form('wtresume');">
        <div class="set_top_name"><span class="set_top_name_n">委托简历名称：</span>{yun:}$info.name{/yun}</div>
        <div class="set_top_money">
            所需金额：<span class="getserbver_box_s pricehtml">{yun:}$config.pay_trust_resume{/yun}</span> 元
        </div>

        <div class="mt15">

            {yun:}if $paytype.wxpay{/yun}
            <div class="spread_box spread_box_bor">
                <div class="spread_zf_list" onclick="paycheck('wxpay');">
                    <i class="wxpay member_set_meal_fk_xz" style="top:0"></i> 微信支付
                </div>
            </div>
            {yun:}/if{/yun} {yun:}if $paytype.alipay{/yun}
            <div class="spread_box spread_box_bor" onclick="paycheck('alipay');">
                <div class="spread_zf_list spread_zf_list_zfb">
                    <i class="alipay member_set_meal_fk_xz" style="top:0"></i> 支付宝支付
                </div>
            </div>
            {yun:}/if{/yun} {yun:}if $paytype.wxpay||$paytype.alipay{/yun}
            <div class="mt15">
                <div class=""><input type="button" value="确认支付" name=nextstep class="reinputText2" onclick="serverPay('wtresume','{yun:}$info.id{/yun}');"></div>
            </div>
            {yun:}else{/yun}
             <div class="pay_zfgb_tip">
                    <span>网站已关闭支付功能，请联系管理员！</span>
                </div>
            {yun:}/if{/yun} {yun:}if $config.sy_freewebtel{/yun}
            <div class="getserbver_box_tel mt15">
                <a href="tel:{yun:}$config.sy_freewebtel{/yun}">客服电话：{yun:}$config.sy_freewebtel{/yun}</a>
            </div>{yun:}/if{/yun}
            <input id="paytype" name="paytype" type="hidden" value="" />
            <input id="price" type="hidden" value="{yun:}$config.pay_trust_resume{/yun}" />
     	</div>
    </form>
	{yun:}/if{/yun}
</section>
<div class="clear"></div>
<script src="{yun:}$wap_style{/yun}/js/pay.js?v={yun:}$config.cachecode{/yun}"></script>
<script>

	function serverPay(server, eid){
		
		var paytype 	= $("#paytype").val();
    	
    	if(paytype == ''){
    		layermsg('请选择支付方式！');
    		return false;
    	}
		
		if(server == 'zdresume'){
			var days 	=	$('input[name="days"]:checked').val(); 
			var pData	= 	{server: server, resumeid: eid, days: days, paytype: paytype};
		}else if(server == 'wtresume'){
			var pData  	= 	{server: server, wteid: eid, paytype: paytype};
		}
    	 
    	var ajaxUrl		= 'index.php?c=getOrder';
    	
    	$.post(ajaxUrl, pData, function(data){
    		
    		var data = eval('(' + data + ')');
    		
    		if(data.error == '0') { // 下单成功成功
    			
    			layermsg(data.msg, 2, function() {
    				location.href = data.url;
    			});
    			
    			return false;
    		} else {
    			
    			layermsg(data.msg, 2, function() {
    				location.reload(true);
    			});
    			
    			return false;
    			 

    		}
    	});
	}
</script>
{yun:}include file="$wapstyle/footer.htm"{/yun}